import React from 'react'
import Footer from "@/components/client/common/Footer";
import Header from "@/components/client/common/Header";
import getContact from "@/ssr/getContact";
import getNavigations from "@/ssr/getNavigations";

export default async function ClientLayout({ children }) {
  const contact = await getContact();
  const navigations = await getNavigations();
  if (!contact || !navigations) {
    return <div>加载中...</div>
  }
  return (
    <>
      <Header navigations={navigations} contact={contact}/>
      <main className="main">{children}</main>
      <Footer navigations={navigations} contact={contact}/>
    </>
  )
}
